-
Notifications
You must be signed in to change notification settings - Fork 138
fix(Comment Section): Sync theme with site color mode #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Comment Section): Sync theme with site color mode #820
Conversation
The Giscus component did not update its theme when the site's color mode was toggled. The theme was only set once during the initial script injection. This change implements the recommended approach for dynamic theme updates by: 1. Using a hook that runs only once on mount to inject the Giscus script with the initial theme. 2. Adding a second hook that listens for changes to . 3. When a change is detected, it sends a to the Giscus iframe to update its theme, ensuring it stays in sync with the site's theme toggle. Fixes recodehive#775
|
@Abhi0049k is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
Synced data from Linked IssuesLabels:
Assignees:
Milestones:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This is a good find @Abhi0049k |
Description
The Giscus component did not update its theme when the site's color mode was toggled. The theme was only set once during the initial script injection.
This change implements the recommended approach for dynamic theme updates by:
Fixes #775 and #773
Type of Change
Original Behaviour
Changes Made
Light Mode

Dark Mode

Checklist
npm run buildand attached screenshot(s) in this PR.